﻿using PropertyEntities.RequestEntities;
using PropertyEntities.ResponseEntities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;

namespace PropertyServices
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IPropertyServiceProvider" in both code and config file together.
    [ServiceContract]
    public interface IPropertyServiceProvider
    {
        [OperationContract]
        [WebInvoke(Method = "POST",
                  BodyStyle = WebMessageBodyStyle.Bare,
                  RequestFormat = WebMessageFormat.Json,
                  ResponseFormat = WebMessageFormat.Json,
                  UriTemplate = "/RegisterAdmin")]
        AdminResponse RegisterAdmin(AdminRequest adminRequest);

        [OperationContract]
        [WebInvoke(Method = "POST",
                  BodyStyle = WebMessageBodyStyle.Bare,
                  RequestFormat = WebMessageFormat.Json,
                  ResponseFormat = WebMessageFormat.Json,
                  UriTemplate = "/UpdateAdmin")]
        AdminResponse UpdateAdmin(AdminRequest adminRequest);

        [OperationContract]
        [WebGet(BodyStyle = WebMessageBodyStyle.Bare,
                  RequestFormat = WebMessageFormat.Json,
                  ResponseFormat = WebMessageFormat.Json,
                  UriTemplate = "/DeleteAdmin/{AdminId}")]
        AdminResponse DeleteAdmin(string AdminId);

        [WebInvoke(Method = "POST",
                  BodyStyle = WebMessageBodyStyle.Bare,
                  RequestFormat = WebMessageFormat.Json,
                  ResponseFormat = WebMessageFormat.Json,
                  UriTemplate = "/Login")]
        LoginResponse Login(LoginRequest loginRequest);

        [OperationContract]
        [WebInvoke(Method = "POST",
                  BodyStyle = WebMessageBodyStyle.Bare,
                  RequestFormat = WebMessageFormat.Json,
                  ResponseFormat = WebMessageFormat.Json,
                  UriTemplate = "/RegisterAgent")]
        AgentResponse RegisterAgent(AgentRequest agentRequest);

        [OperationContract]
        [WebGet(BodyStyle = WebMessageBodyStyle.Bare,
                  RequestFormat = WebMessageFormat.Json,
                  ResponseFormat = WebMessageFormat.Json,
                  UriTemplate = "/DeleteAgent/{AgentId}")]
        AgentResponse DeleteAgent(string AgentId);

        [OperationContract]
        [WebInvoke(Method = "POST",
                  BodyStyle = WebMessageBodyStyle.Bare,
                  RequestFormat = WebMessageFormat.Json,
                  ResponseFormat = WebMessageFormat.Json,
                  UriTemplate = "/UpdateAgent")]
        AgentResponse UpdateAgent(AgentRequest agentRequest);

        [OperationContract]
        [WebGet(BodyStyle = WebMessageBodyStyle.Bare,
                  RequestFormat = WebMessageFormat.Json,
                  ResponseFormat = WebMessageFormat.Json,
                  UriTemplate = "/GetMes")]
        string getTestMessage();

    }
}
